package com.ktjy.ktmall.entity;

/**
 * 购物类实体类，对应t_cart购物车表
 * @version v1.0
 * @Author 郴州科泰
 * @Create 2024-08-01 - 17:50
 */
public class CartItem {

    private int id; // 主键id
    private int userId;  // 微信用户id
    private int skuId; // 商品SKU的id, sku_id引用于t_sku_info表的主键id
    private int goodsCount; // 本次加入购物车中的商品数量
    private int selected;  // 选中状态：0表示false未选中，1表示true选中
    private int enabled;  // 状态(0:正常 1:禁用)
    private String createTime;  // 创建时间
    private String updateTime;  // 修改时间

    private SkuItem skuItem; // 商品SKU对象
    private WxUser wxUser;  // 微信用户对象

    public SkuItem getSkuItem() {
        return skuItem;
    }

    public void setSkuItem(SkuItem skuItem) {
        this.skuItem = skuItem;
    }

    public WxUser getWxUser() {
        return wxUser;
    }

    public void setWxUser(WxUser wxUser) {
        this.wxUser = wxUser;
    }

    public int getSelected() {
        return selected;
    }

    public void setSelected(int selected) {
        this.selected = selected;
    }

    public CartItem() {  }

    public CartItem(int userId, int skuId, int goodsCount) {
        this.userId = userId;
        this.skuId = skuId;
        this.goodsCount = goodsCount;
    }

    public CartItem(int id, int userId, int skuId, int goodsCount,int selected) {
        this.id = id;
        this.userId = userId;
        this.skuId = skuId;
        this.goodsCount = goodsCount;
        this.selected = selected;
    }
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getSkuId() {
        return skuId;
    }

    public void setSkuId(int skuId) {
        this.skuId = skuId;
    }

    public int getGoodsCount() {
        return goodsCount;
    }

    public void setGoodsCount(int goodsCount) {
        this.goodsCount = goodsCount;
    }

    public int getEnabled() {
        return enabled;
    }

    public void setEnabled(int enabled) {
        this.enabled = enabled;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
}
